<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>

    </style>
</head>

<body>

    <div id="box">


    </div>


    <script src="./js/react.js"></script>
    <script src="./js/react-dom.js"></script>
    <script src="./js/babel.min.js"></script>

    <script type="text/babel">

        function Book(props){
            console.log("props",props);
            return (
                <div>
                    <p>书名：{props.name}</p>
                    <p>价格：{props.price}</p>
                </div>
            )
        }
       
       

        const root = (<div>
            <h1>组件：</h1>
            {Book({name:"西厢记",price:100})}
            <hr/>
            <Book name="三国演义" price="21.8" />
        </div>
        );

        ReactDOM.render(root, document.getElementById("box"));


    </script>
</body>

</html>